home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / os2 / pccts.zip / PCCTS1.TXT < prev    next >
Text File  |  1992-12-08  |  4KB  |  125 lines

  1.  
  2.  
  3.  
  4. PCCTS - The Purdue Compiler Construction Tool Set
  5.  
  6.  
  7.      PCCTS is a set of public domain software tools designed to facil-
  8. itate  the  implementation of compilers and other translation systems.
  9. These tools currently include antlr, dlg and support  code.   In  many
  10. ways,  PCCTS is similar to a highly integrated version of YACC [Joh78]
  11. and LEX [Les75]; where antlr (ANother Tool for  Language  Recognition)
  12. corresponds  to  YACC  and  dlg (DFA-based Lexical analyzer Generator)
  13. functions like LEX.  However, PCCTS has many additional features which
  14. make it easier to use for a wider range of translation problems.
  15.  
  16.      PCCTS grammars contain specifications for lexical  and  syntactic
  17. analysis,  intermediate-form  construction and error reporting.  Rules
  18. may employ Extended Backus Naur Form (EBNF) grammar constructs and may
  19. define  parameters,  return  values  and  local  variables.  Languages
  20. described in PCCTS are recognized via Strong LL(k) parsers constructed
  21. in  pure,  human-readable,  C  code.   As a result, standard debugging
  22. tools can be used to trace and debug PCCTS parsers.   Breakpoints  can
  23. be  set  so  that parser execution stops before or after grammar frag-
  24. ments of interest have been recognized.
  25.  
  26.      PCCTS grammars may contain predicates which allow parsing to be a
  27. function  of semantics as well as syntax - context-sensitive grammars.
  28. In addition, PCCTS supports  intermediate-form  (such  as  expression-
  29. trees)  construction via a flexible Abstract-Syntax Tree (AST) mechan-
  30. ism which allows trees to be built explicitly or  automatically.   The
  31. user  explicitly  creates  trees  via  a LISP-like tree constructor or
  32. directs the automatic tree construction facility  via  simple  grammar
  33. directives.   AST  nodes are user-defined and are generally a function
  34. of attributes.  A default transformation from attributes ($-variables)
  35. to  AST  nodes can be specified.  Alternatively, each tree node can be
  36. defined explicitly via an AST node constructor.
  37.  
  38.  
  39.      PCCTS includes a number of different programs and examples in the
  40. software  release  package-most  of  which  like  to live in their own
  41. directories.  The install script will build a standard hierarchy.  The
  42. PCCTS  executables (antlr, dlg) may be placed anywhere the user wishes
  43. but the install script places them in the bin directory created during
  44. installation.
  45.  
  46.      To begin installation, the user should create a  directory  (usu-
  47. ally  called  pccts)  where the PCCTS source subtree is to be created.
  48. Place the pccts.bag file and the install script  into  this  directory
  49. and cd into it.  To install PCCTS, simply type
  50.  
  51. sh install
  52.  
  53. which will build the standard PCCTS  directory  hierarchy  (under  the
  54. directory  where  you  ran the install script), unbag all of the files
  55. and build executable versions of antlr and dlg.
  56.  
  57.      The examples associated with PCCTS have makefile variables called
  58.  
  59.  
  60.  
  61.                                                                 Page 1
  62.  
  63.                                                                  PCCTS
  64.  
  65.  
  66. ANTLR,  DLG etc... which must be set according to your personal direc-
  67. tory structure before make'ing.  Some variables  point  to  the  PCCTS
  68. executables if the PATH environment variable does not include your bin
  69. directory.  Also, there are variables  that  point  to  PCCTS  include
  70. directories and must be changed if you deviate from the standard PCCTS
  71. installation hierarchy.  antlr and dlg can be built without executable
  72. versions of themselves (antlr and dlg are written in themselves).
  73.  
  74.  
  75.      A C program called genmk.c is available in the support  directory
  76. of the PCCTS release which has the following usage:
  77.  
  78. genmk project f1.g f2.g ... fn.g
  79.  
  80. It generates a makefile that creates an executable,  project,  from  a
  81. set of grammar files.  Typing make will create the executable.
  82.  
  83.  
  84. dlg(1), pccts(1)
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.                                                                 Page 2
  124.  
  125.